Skip to content

improve: remove JSON Patch from PrimaryUpdateAndCacheUtils #2795

Closed
csviri wants to merge 2 commits intomainfrom
remove-edit
Closed

improve: remove JSON Patch from PrimaryUpdateAndCacheUtils #2795
csviri wants to merge 2 commits intomainfrom
remove-edit

Conversation

@csviri
Copy link
Copy Markdown
Collaborator

@csviri csviri commented May 13, 2025

No description provided.

csviri added 2 commits May 13, 2025 14:11
If no optimistic locking is used a list element removal might remove an not desired element
if there was a concurrent element removal.

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@openshift-ci openshift-ci bot requested review from metacosm and xstefank May 13, 2025 12:14
@csviri csviri changed the title remove edit improve: remove JSON Patch from PrimaryUpdateAndCacheUtils May 13, 2025
@csviri
Copy link
Copy Markdown
Collaborator Author

csviri commented May 13, 2025

I think this is a gray area to discuss, we might say that this is the responsibility of the user to evaluate if JSON Patch is valid for his/her use case.

Copy link
Copy Markdown
Collaborator

@metacosm metacosm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The javadoc on this class should be improved, though as it is unclear what the methods do concretely, the parameters are not clearly or correctly documented. Usage should be documented as well.

@csviri
Copy link
Copy Markdown
Collaborator Author

csviri commented May 14, 2025

@metacosm usage is documented here: https://javaoperatorsdk.io/docs/documentation/reconciler/#using-internal-cache

Will do some improvements today, and will take a look on javadoc too

@csviri
Copy link
Copy Markdown
Collaborator Author

csviri commented May 14, 2025

improved javadoc and namings is a followup PR: #2796

@csviri
Copy link
Copy Markdown
Collaborator Author

csviri commented May 14, 2025

Still a bit hesitating on this one, we might just point out the risk of JSON Patch.

@csviri
Copy link
Copy Markdown
Collaborator Author

csviri commented May 14, 2025

at the end I think a better approach is just document the risk, will do it here:
https://github.com/operator-framework/java-operator-sdk/pull/2799/files

@csviri csviri closed this May 14, 2025
@csviri csviri deleted the remove-edit branch November 8, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants